home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / tri14dev.lha / Triton / Developer / gcc / source / tr_firstoccurance.c < prev    next >
C/C++ Source or Header  |  1995-08-25  |  809b  |  29 lines

  1. /*
  2.  *  Triton - The object oriented GUI creation system for the Amiga
  3.  *  Written by Stefan Zeiger in 1993-1994
  4.  *
  5.  *  (c) 1993-1994 by Stefan Zeiger
  6.  *  You are hereby allowed to use this source or parts of it for
  7.  *  creating programs for AmigaOS which use the Triton GUI creation
  8.  *  system. All other rights reserved.
  9.  *
  10.  *  Triton linkable library code for GCC - (c) 1994 by Gunther Nikl
  11.  */
  12.  
  13. #include "triton.h"
  14.  
  15. extern struct Library *TritonBase;
  16.  
  17. LONG TR_FirstOccurance(UBYTE ch, STRPTR str)
  18. {
  19.   register LONG _res __asm("d0");
  20.   register struct Library *a6 __asm("a6") = TritonBase;
  21.   register STRPTR a0 __asm("a0") = str;
  22.   register UBYTE d0 __asm("d0") = ch;
  23.   __asm __volatile ("jsr a6@(-0x2a)"
  24.   : "=r" (_res)
  25.   : "r" (a6), "r" (a0), "r" (d0)
  26.   : "a0","a1","d0","d1", "memory");
  27.   return _res;
  28. }
  29.